﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Dataacess.ProductTableAdapters;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            Product product = new Product();
            var queryResults = from c in product.productList
                               where c.recordid == 16
                               select new
                               {
                                   ID = c.recordid,
                                   Name = c.pname,
                                   Ptype = c.ptype
                               };
            dGridproduct.DataSource = queryResults;
        }
    }
}
